package com.demo.dao.impl;

import java.util.List;

import org.beetl.sql.core.SQLManager;
import org.beetl.sql.ext.spring.SpringBeetlSql;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.demo.dao.AppInfoDao;
import com.demo.entity.AppInfo;

/**********************************************************
 *
 * 文件名称：AppInfoDaoImpl.java 
 * 摘    要：
 *
 * 初始版本：1.0.0.0
 * 原 作 者：叶平平
 * 完成日期：2015-12-25 上午11:40:45
 * 
 ************************************************************/
@Repository
public class AppInfoDaoImpl implements AppInfoDao{

	@Autowired
	private SpringBeetlSql beetlsql;
	
	public List<AppInfo> queryAppInfos(){
		SQLManager sql = beetlsql.getSQLMananger();
		AppInfo appInfo = new AppInfo();
		//List<AppInfo> list = sql.select("appinfo.findAll", AppInfo.class, appInfo);
		appInfo.setApp_key("100019960000030535");
		List<AppInfo> list = sql.select("appinfo.findByAppKey", AppInfo.class, appInfo);
		
		appInfo.setApp_key("900019960000030535");
		sql.insert(AppInfo.class, appInfo);
		return list;
	}
}
